﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace InfonavaEye.handler
{
    public interface IPLCHandler
    {
        void StartPLC();

        void ClosePLC();

        /// <summary>
        /// 电机停止移动
        /// </summary>
        void stopMoving();

        /// <summary>
        /// 读取当前xyz坐标点位置
        /// </summary>
        /// <returns></returns>
        int[] readCurrentXYZ();


        /// <summary>
        /// 移动到指定位置并拍照
        /// </summary>
        /// <param name="x"></param>
        /// <param name="y"></param>
        /// <param name="z"></param>
        /// <param name="captureEnable"></param>
        void moveToXYZandCapture(Int32 x, Int32 y, Int32 z, bool captureEnable = true);

        /// <summary>
        /// 调节焦距
        /// （调节Z轴的位置）
        /// </summary>
        /// <param name="distance"></param>
        /// <param name="completeCallback"></param>
        void ChangeFocusDistance(int distance, Action<int, string> completeCallback);

        /// <summary>
        /// 让Z轴回原点
        /// </summary>
        void backToZero();

        /// <summary>
        /// 检查是否回到了原点
        /// </summary>
        /// <returns></returns>
        bool checkOrigin();

        /// <summary>
        /// 锁定手动调整手轮
        /// </summary>
        void lockManual();

        /// <summary>
        /// 解锁手动调整手轮
        /// </summary>
        void unlockManual();
    }
}
